#!/usr/bin/env php
<?php
/**
 * Yii console bootstrap file.
 *
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

defined('YII_SOFT_PATH') or define('YII_SOFT_PATH', __DIR__ .'/../yiiframework2');
defined('YII_VENDOR_PATH') or define('YII_VENDOR_PATH', YII_SOFT_PATH. '/vendor');

require YII_SOFT_PATH . '/vendor/autoload.php';
require YII_SOFT_PATH . '/vendor/yiisoft/yii2/Yii.php';

$config = require __DIR__ . '/config/console.php';

$application = new yii\console\Application($config);
$application->setVendorPath(YII_VENDOR_PATH);
// 暂时没有弄清楚YII2的自动加载机制 手动加上别名
Yii::setAlias('@core', YII_SOFT_PATH. '/core');
$exitCode = $application->run();
exit($exitCode);
